// 文件路径：src/main/java/com/ruoyi/system/domain/vo/ComingOutVO.java
package com.ruoyi.system.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
public class ComingOutVO {
    @JsonFormat(shape = JsonFormat.Shape.STRING) // 关键注解
    private Long id;
    @JsonFormat(shape = JsonFormat.Shape.STRING) // 关键注解
    private Long categoryId;
    @JsonFormat(shape = JsonFormat.Shape.STRING) // 关键注解
    private Long parentId;
    private String parentName;
    private String name;
    private Integer operationType;//0出库1进库
    private Integer operationBeforeCount; // 操作前数量
    private Integer operationNum;//操作数量
    private Integer operationAfterCount; // 操作后数量p
    private Integer surplusCount;//当前库存
    private Date createTime;

    // 可选的转换方法
    public static ComingOutVO fromEntity(com.ruoyi.system.domain.ComingOut entity) {
        ComingOutVO vo = new ComingOutVO();
        vo.setCategoryId(entity.getCategoryId());
        vo.setSurplusCount(entity.getSurplusCount());
        return vo;
    }
}
